Optimal. Leaf size=24 \[ -\csc (x)-\frac{1}{2} i \tanh ^{-1}(\cos (x))+\frac{1}{2} i \cot (x) \csc (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13226, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2606, 8, 2611, 3770} \[ -\csc (x)-\frac{1}{2} i \tanh ^{-1}(\cos (x))+\frac{1}{2} i \cot (x) \csc (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3518
Rule 3108
Rule 3107
Rule 2606
Rule 8
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\csc ^3(x)}{i+\tan (x)} \, dx &=\int \frac{\cot (x) \csc ^2(x)}{i \cos (x)+\sin (x)} \, dx\\ &=-\left (i \int \cot (x) \csc ^2(x) (\cos (x)+i \sin (x)) \, dx\right )\\ &=-\left (i \int \left (i \cot (x) \csc (x)+\cot ^2(x) \csc (x)\right ) \, dx\right )\\ &=-\left (i \int \cot ^2(x) \csc (x) \, dx\right )+\int \cot (x) \csc (x) \, dx\\ &=\frac{1}{2} i \cot (x) \csc (x)+\frac{1}{2} i \int \csc (x) \, dx-\operatorname{Subst}(\int 1 \, dx,x,\csc (x))\\ &=-\frac{1}{2} i \tanh ^{-1}(\cos (x))-\csc (x)+\frac{1}{2} i \cot (x) \csc (x)\\ \end{align*}
Mathematica [B] time = 0.021679, size = 75, normalized size = 3.12 \[ -\frac{1}{2} \tan \left (\frac{x}{2}\right )-\frac{1}{2} \cot \left (\frac{x}{2}\right )+\frac{1}{8} i \csc ^2\left (\frac{x}{2}\right )-\frac{1}{8} i \sec ^2\left (\frac{x}{2}\right )+\frac{1}{2} i \log \left (\sin \left (\frac{x}{2}\right )\right )-\frac{1}{2} i \log \left (\cos \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.039, size = 42, normalized size = 1.8 \begin{align*} -{\frac{1}{2}\tan \left ({\frac{x}{2}} \right ) }-{\frac{i}{8}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+{{\frac{i}{8}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-2}}-{\frac{1}{2} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{i}{2}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.24577, size = 80, normalized size = 3.33 \begin{align*} -\frac{{\left (\frac{4 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - i\right )}{\left (\cos \left (x\right ) + 1\right )}^{2}}{8 \, \sin \left (x\right )^{2}} - \frac{\sin \left (x\right )}{2 \,{\left (\cos \left (x\right ) + 1\right )}} - \frac{i \, \sin \left (x\right )^{2}}{8 \,{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{1}{2} i \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.13258, size = 232, normalized size = 9.67 \begin{align*} \frac{{\left (-i \, e^{\left (4 i \, x\right )} + 2 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) +{\left (i \, e^{\left (4 i \, x\right )} - 2 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) - 6 i \, e^{\left (3 i \, x\right )} + 2 i \, e^{\left (i \, x\right )}}{2 \,{\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{3}{\left (x \right )}}{\tan{\left (x \right )} + i}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.3854, size = 63, normalized size = 2.62 \begin{align*} -\frac{1}{8} i \, \tan \left (\frac{1}{2} \, x\right )^{2} - \frac{6 i \, \tan \left (\frac{1}{2} \, x\right )^{2} + 4 \, \tan \left (\frac{1}{2} \, x\right ) - i}{8 \, \tan \left (\frac{1}{2} \, x\right )^{2}} + \frac{1}{2} i \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) - \frac{1}{2} \, \tan \left (\frac{1}{2} \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]